import {Request} from "@/api/request";
import Qs from 'qs'
export function getMarkDown(url: string) {
    return Request.axiosInstance({
        url: url,
        method: 'get'
    })
}

export function getAllArticle(limit: number, offset: number, id?: number) {
    return Request.axiosInstance({
        url: '/api/article/getAllByPage',
        method: 'post',
        data: Qs.stringify({limit, offset, id})
    })
}

export function getArticleCount() {
    return Request.axiosInstance({
        url: '/api/article/getCount',
        method: 'get'
    })
}

export function findArticle(id) {
    return Request.axiosInstance({
        url: '/api/article/find',
        method: 'post',
        data: Qs.stringify({id})
    })
}
